
var oProduct=document.getElementById('productCar');
var oShopcar=document.getElementById('product-shopCar');
var oWid=document.getElementById('wid');
var omoveUl=document.getElementById('moveul');
var oLi=omoveUl.getElementsByTagName('li');
var oBtnLeft=document.getElementById('left');
var oBtnRight=document.getElementById('right');
for(var i=0;i<oLi.length;i++){
	oLi[i].style.width=parseFloat(oWid.offsetWidth)/4+'px';
}
var num=0;
omoveUl.innerHTML+=omoveUl.innerHTML+omoveUl.innerHTML;
omoveUl.style.width=oLi[0].offsetWidth * oLi.length +'px';
var left=parseInt((omoveUl.offsetWidth)/3);
oBtnLeft.onclick=function(){
	num--;
	if(num<0){
		num=2;
	}
	startmove(omoveUl,{left:-left*num});
	
}
oBtnRight.onclick=function(){
	num++;
	if(num>2){
		num=0;
	}
	startmove(omoveUl,{left:-left*num});
}
function move(){
	num++;
	if(num>2){
		num=0;
	}
	startmove(omoveUl,{left:-left*num});
}
var timer=setInterval(move,3000);
oProduct.onmouseover=function(){
	clearInterval(timer);
}
oProduct.onmouseout=function(){
	timer=setInterval(move,3000);
}


var oBtnPart=document.getElementById('btnpart');
var oBtnColor=document.getElementById('btncolor');
var oPart=document.getElementById('part');
var oColor=document.getElementById('color');
oBtnPart.onclick=function(){
	oBtnColor.className='fr';
	oBtnPart.className='active';
	oPart.style.display='block';
	oColor.style.display='none';
}
oBtnColor.onclick=function(){
	oBtnPart.className='fl';
	oBtnColor.className='active';
	oPart.style.display='none';
	oColor.style.display='block';
}